package com.agenda;

import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;

public class ListaOpcionesH extends Activity {
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.lista_opciones_h);
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.opciones_act_main, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.accAddU:
            	Toast.makeText(getApplicationContext(), "probando", Toast.LENGTH_SHORT).show();
				
                return true;
            /*case R.id.MnuOpc2:
                lblMensaje.setText("Opcion 2 pulsada!");;
                return true;
            case R.id.MnuOpc3:
                lblMensaje.setText("Opcion 3 pulsada!");;
                return true;*/
            default:
                return super.onOptionsItemSelected(item);
        }
    }
    
    /*@Override
    public void onConfigurationChanged(Configuration newConfig)
    {
    	if( getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT )
    	{
    		//Vertical
    		
    		Intent i = new Intent(this, ListaOpciones.class );
            startActivity(i);
            finish();
    	}
    	
    	super.onConfigurationChanged(newConfig);
   
    }*/
    
    public void salir(View view) {
    	finish();
    }
    
    public void insertar(View view) {
    	Intent i = new Intent(this, Insertar.class );
        startActivity(i);
    }
    
    public void editar(View view) {
    	Intent i = new Intent(this, Editar.class );
        startActivity(i);
    }
}